package com.zzw.hj6;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @Project: hw_java
 * @Description: 质数因子
 * @Author: zzw
 */

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        List<Integer> numList = new ArrayList<>();
        int i = 2;
        // 短除法思想
        while (num > 1) {
            if (num % i == 0) {
                num = num / i;
                numList.add(i);
                continue;
            }
            i++;
        }
        for (Integer n : numList) {
            System.out.print(n + " ");
        }
    }
}